/**
 * Action.js 文件用来创建 Action
 * 
 * Action 本质上是一个普通对象
 */

// 添加任务
export const addTaskAction = (title) => {
    return {
        type: 'add_task',
        title: title
    }
}

// 删除任务
export const deleteTaskAction = (id) => {
    return {
        type: 'delete_task',
        id
    }
}

// 单个切换
export const toggleOneAction = (id) => {
    return {
        type: 'toggleA_tast',
        id
    }
}

// 全选任务
export const allSelectAction = (status) => {
    return {
        type: 'all_select_tast',
        status
    }
}

// 编辑显示输入框
export const handleDoubleAction = (id) => {
    return {
        type: 'handle_double_tast',
        id: id
    }
}

// 编辑功能
export const EditEtileAction = (id, value) => {
    return {
        type: 'edit_title_tast',
        id: id,
        value: value
    }
}

// 筛选条件切换
export const handleFilterAction = (currentType) => {
    return {
        type: 'filter_task',
        currentType
    }
}

// 清空
export const handleClearAllAction = (currentType) => {
    return {
        type: 'clear_all'
    }
}